<template>
  <div>
    <Header ></Header>
    <div style="background:#f6f6f6;width:100%;height:30px;"></div>
    <div class="search">
      <div class="left">
        <div class="left-h">
          <p>关于"<span>{{this.title}}</span>"的相关信息</p>
        </div>
      </div>
      <div class="right">
        <img src="../../assets/images/card.jpg" alt>
        <img src="../../assets/images/card.jpg" alt>
        <div class="right-tags">
          <div class="tags-title">
            <P>热门标签</P>
          </div>
          <div class="tags-content">
            <div>
              <span>配置信</span>
              <span>配置信</span>
              <span>配置信</span>
              <span>配置信</span>
              <span>配置信</span>
              <span>配置信</span>
              <span>配置信</span>
              <span>配置信</span>
              <span>配置信</span>
            </div>
          </div>
        </div>
        <div class="tags-list">
          <div class="box">2019年十大营销关键词</div>
          <div class="list-title">
            <P>热门文章</P>
          </div>
          <img src="../../assets/images/card.jpg" alt>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
import eventBus from "@/common/js/eventBus.js";
import Header from "@/common/Header/Header";
export default {
  data() {
    return {
      list: [],
      title:'',
    };
  },
  methods: {
    //获取搜索穿过来的值
    geteventData() {
      var _this = this;
      eventBus.$on("header", function(val) {
        _this.list = val;
        console.log(_this.list,456);
      });
      eventBus.$on("headerlist", function(val) {
        _this.title = val;
        console.log(_this.title,123);
      });
    },
  },
  mounted() {
    this.geteventData();
  },
  beforeDestroy() {
    eventBus.$off('header');
    eventBus.$off('headerlist');
  },
  components: {
    Header
  }
};
</script>
<style lang="scss" scoped>
.search {
  width: 1170px;
  height: auto;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  margin-bottom: 30px;
  .right {
    width: 330px;
    img {
      display: block;
      width: 100%;
      height: 130px;
      border-radius: 10px;
      margin-bottom: 40px;
    }
    .right-tags {
      background: #fff;
      width: 100%;
      height: 220px;
      .tags-title {
        width: 90%;
        height: 50px;
        margin: 0 auto;
        position: relative;
        border-bottom: 2px solid #f8f8f8;
        p {
          position: absolute;
          left: 0;
          bottom: -18px;
          font-size: 18px;
          border-bottom: 2px solid #5b90bc;
        }
      }
      .tags-content {
        width: 170px;
        width: 90%;
        margin: 0 auto;
        margin-top: 10px;
        div {
          width: 80%;
          padding-left: 20px;
          span {
            display: inline-block;
            width: 60px;
            height: 20px;
            border-radius: 10px;
            font-size: 10px;
            color: #ddd;
            border: 1px solid #ddd;
            margin-bottom: 20px;
          }
        }
      }
    }
    .tags-list {
      background: #f5f5f5;
      width: 100%;
      margin-top: 30px;
      height: 200px;
      position: relative;
      .box {
        height: 50px;
        width: 90%;
        position: absolute;
        bottom: -10px;
        left: 5%;
        color: #f5f5f5;
        background: #000;
        opacity: 0.5;
        border-radius: 0px 0px 10px 10px;
        line-height: 50px;
        font-size: 18px;
        padding-right: 80px;
      }
      .list-title {
        width: 90%;
        height: 50px;
        margin: 0 auto;
        position: relative;
        border-bottom: 2px solid #f0f0f0;
        p {
          position: absolute;
          left: 0;
          bottom: -18px;
          font-size: 18px;
          border-bottom: 2px solid #5b90bc;
        }
      }
      img {
        display: block;
        width: 90%;
        margin: 0 auto;
        height: 150px;
        border-radius: 10px;
        margin-top: 10px;
      }
    }
  }
}
</style>


